<?php
/**
 * Nordic Repository
 * 
 * LICENSE
 * 
 * The new BSD license is applied on this source-file. For further
 * information please visit http://license.nordic-dev.de/newbsd.txt
 * or send an email to andre.moelle@gmail.com.
 */

/**
 * These objects can only be decorated but not decorate others.
 * 
 * @category   Nordic
 * @package    Nordic_Pagebuilder
 * @copyright  2007 Nordic Development
 * @license    http://license.nordic-dev.de/newbsd.txt (New-BSD license)
 * @author     Andre Moelle <andre.moelle@gmail.com>
 * @version    $Id: Decorated.php 3 2007-07-08 09:21:42Z andre.moelle $
 */
abstract class Nordic_Pagebuilder_Decorated extends Nordic_Pagebuilder_Decorator
{
	/**
	 * Cannot decorate others.
	 * 
	 * @throws Nordic_Pagebuilder_Exception
	 * @see Nordic_Pagebuilder_Decorator::decorate()
	 */
	public function decorate (Nordic_Pagebuilder_Decorator $decorator)
	{
		throw new Nordic_Pagebuilder_Exception(
			'Decorated objects cannot decorate other decorators'
		);
	}
	
	/**
	 * Cannot have objects to decorate.
	 * 
	 * @throws Nordic_Pagebuilder_Exception
	 * @see Nordic_Pagebuilder_Decorator::getDecorated()
	 */
	public function getDecorated ()
	{
		throw new Nordic_Pagebuilder_Exception(
			'Decorated objects have no objects they can decorate'
		);
	}
}
?>